package vtt.android.dapanhc.activities.fragments;

import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;


public class BaseWebFragment extends BaseFragment {
	
	/**
	 * setup webview
	 */
	protected WebView setupWebview(WebView webView, WebChromeClient webChromeClient, WebViewClient webClient, Object androidBridge) {
		WebSettings webSettings = webView.getSettings();
		webSettings.setJavaScriptEnabled(true);
		webSettings.setBuiltInZoomControls(false);
//		webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
		
		webView.setScrollBarStyle(WebView.SCROLLBARS_INSIDE_OVERLAY);
		
		webView.addJavascriptInterface(androidBridge, "Android");
		webView.setWebViewClient(webClient);
		webView.setWebChromeClient(webChromeClient);
		
		return webView;
	}
	
}
